package Test02;

import java.util.Date;

class Transaction {
    private Date transactionTime;
    private double amount;
    private String type;

    public Transaction(double amount, String type) {
        this.transactionTime = new Date();
        this.amount = amount;
        this.type = type;
    }

//Getter  Setter and toString methods...


    @Override
    public String toString() {
        return "Test02.Transaction{" +
                "transactionTime=" + transactionTime +
                ", amount=" + amount +
                ", type='" + type + '\'' +
                '}';
    }

    public Date getTransactionTime() {
        return transactionTime;
    }

    public void setTransactionTime(Date transactionTime) {
        this.transactionTime = transactionTime;
    }

    public double getAmount() {
        return amount;
    }

    public void setAmount(double amount) {
        this.amount = amount;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }
}
